package cheme.ProcessEditor.Parts.Equations;

import java.util.List;

import org.eclipse.draw2d.FreeformFigure;
import org.eclipse.draw2d.FreeformViewport;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.Viewport;
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.GraphicalEditPart;

import cheme.ProcessEditor.ChemeConstants;
import cheme.ProcessEditor.LeafFigureNavigator;
import cheme.ProcessEditor.Figures.PaletteFig;
import cheme.ProcessEditor.Figures.Util.IEquationPalette;
import cheme.ProcessEditor.Parts.PropertyAwarePart;
import cheme.ProcessEditor.Parts.Streams.Tag.PolicyDummyLayout;
import cheme.ProcessModel.Equations.EquationPalette;

public class PartEquationPalette extends PropertyAwarePart implements IEquationPalette
{
	@Override
	protected IFigure createFigure()
	{
		PaletteFig figure = new PaletteFig();
		figure.setToolTip(new Label("You can drag these math symbols into your equations."));
		return figure;
	}
	
	@Override
	protected void createEditPolicies()
	{
//		installEditPolicy(EditPolicy.COMPONENT_ROLE, new PolicyTagComponent());
		
		
		installEditPolicy(EditPolicy.LAYOUT_ROLE, new PolicyDummyLayout());
	}
	
	public EquationPalette getEquationPalette()
	{
		return (EquationPalette)getModel();
	}
	
	public PaletteFig getPaletteFig()
	{
		return (PaletteFig)getFigure();
	}
	
	@Override
	protected List getModelChildren()
	{
		return getEquationPalette().getChildren();
	}
}